import { FILTER } from '../constant/todos'

export default function filter(filter = 'all', action) {
  if (action.type === FILTER) {
    return action.val
  }
  return filter
}
